package com.newaim.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.util.Date;

@Slf4j
@Component
public class TimerTask {

   // @Scheduled(cron = "0 0 0/1 * * ? ")
    public void timeTask1() {
        log.info("====== start timeTask1:"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
    }

    //@Scheduled(fixedRate = 600000)
    public void timeTask2() {
        log.info("====== start timeTask2:"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
    }

}
